<?php
	$_SETTING['sidebar'] = "FALSE";
	include $_SERVER['DOCUMENT_ROOT']."/include/header.php";
	
	$div_left_content = array(name=>"left_content",custom=>"height:auto; width:0%; float:left;");
	$div_right_content = array(name=>"right_content",custom=>"height:auto; width:100%; float:right; ");
	//$div1 = array(name=>"div1",custom=>"min-height:20px; width:95%; padding:20px 0px 0px 10px;");
	$div2 = array(name=>"div2",custom=>"min-height:20px; width:95%; float:right; padding:20px 20px 0px 0px;");
	//$div3 = array(name=>"div3",custom=>"min-height:20px; width:95%; float:right; padding:20px 20px 0px 0px;");
	//$div4 = array(name=>"div4",custom=>"min-height:20px; width:95%; padding:20px 0px 0px 10px;");
	
	createDiv($div_left_content);
	createDiv($div_right_content);
	//createDiv($div1);
	createDiv($div2);
	//createDiv($div3);
	//createDiv($div4);
	checkAccess(array('roles'=>array(null)));
?>
<script type="text/javascript">
	function authenticate()
	{		
		$('#status').html("<font color='red'>Checking.....please wait</font>");
		$.post('loginSubmit.php', {username:$("#username").val(), password:$("#password").val()} , function(result) {
		  if(result == "success")
		  {
			$('#status').html("<font color='green'>Success</font>");
			window.location.replace("index.php");
		  }else{
			$('#status').html("<font color='red'>Username or Password is incorrect</font>");
		  }
		});
	}
</script>
<div class="left_content">
</div>

<div class="right_content">	
<!-- box begin -->
						<div class="div2" align="center" >
							<div class="border-top">
								<div class="border-right">
									<div class="border-bot">
										<div class="border-left">
											<div class="left-top-corner">
												<div class="right-top-corner">
													<div class="right-bot-corner">
														<div class="left-bot-corner">
															<div class="inner">
															<h3>Login</h3>
<!--  Start Coding Here -->
<div id="form_container">
<form action="loginSubmit.php" method="post" class="niceform" onsubmit="return false;">
	<fieldset>
    	<legend>Login</legend>
        <dl>
        	<dt><label for="username">Username:</label></dt>
            <dd><input type="text" name="username" id="username" size="32" maxlength="20" value="" /></dd>
        </dl>
        <dl>
        	<dt><label for="password">Password:</label></dt>
            <dd><input type="password" name="password" id="password" size="32" maxlength="20" value="" /></dd>
        </dl>
    </fieldset>
    <fieldset class="action">
    	<input type="button" name="login" id="login" value="Login" onclick="authenticate();" />
		<div id="status"></div>
    </fieldset>
</form>
</div>
<!--  End Coding Here -->
<!--  End box -->
															</div>
														</div>
													</div>
												</div>
											</div>
										</div>
									</div>
								</div>
							</div>
						</div>
</div>
<?php 
	include $_SERVER['DOCUMENT_ROOT']."/include/footer.php";
?>